package com.itcast.controller;



import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.itcast.entity.TbUser;
import com.itcast.service.TbUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;


/**
 * (TbUser)表控制层
 *
 * @author makejava
 * @since 2020-11-09 16:32:59
 */
@RestController
@RequestMapping("/user")
public class TbUserController  {
    @Autowired
    TbUserService tbUserService;
    @GetMapping("{id}")
    public TbUser findUser(@PathVariable("id") Integer id) {
        return tbUserService.getById(id);
    }
    @GetMapping("/all")
    public List<TbUser> listUser() {

        return tbUserService.list();
    }

}